<div class="form">
    <form name="form" action="" method="post">
        <fieldset>
            <legend>{add_new}:</legend>
            <span style="color: red;font-weight: bold;display: block;margin: 0 0 10px 7px;">{error}</span>
            <div class="input_wrapper">
                
                <div class="input">
                    <label>{com_name_label}</label>
                    <span>
                        <input type="text" name="com_name" />
                    </span>
                </div>
                <div class="input">
                    <label>{create_model_label}:</label>
                    <span>
                        <input type="checkbox" name="model_name" />
                    </span>
                </div>
            [OPEN list_input]
                [LOOP input]
                <fieldset>
                    <legend>{lang_name}:</legend>
                    <div class="input">
                        <label>{com_seokey_label}</label>
                        <span>
                            <input class="empty" type="text" name="seokey_name_{code}" /><span class="red">(*)</span>
                        </span>
                    </div>
                    <div class="input">
                        <label>{com_cat_label}</label>
                        <span>
                            <input class="empty" type="text" name="cat_name_{code}" /><span class="red">(*)</span>
                        </span>
                    </div>
                    <div class="input">
                        <label>{com_status_label}</label>
                        <span>
                            <select name="status_{code}">
                                <option value="show">{show}</option>
                                <option value="hide">{hide}</option>
                                <option value="del">{del}</option>
                            </select>
                        </span>
                    </div>
                </fieldset>
                [/LOOP input]
          [CLOSE list_input]
                
            
                <div class="input submit">
                    <input type="submit" name="save" value="{save}" />
                </div>
                <input type="hidden" name="app" />
            </div>
        </fieldset>
    </form>
</div>
<script type="text/javascript">
$(document).ready(function(){
   $('input[name="save"]').click(function(){
        var empty = false;
        $('input[class="empty"]').each(function(){ 
    		var input_val = $(this).val();
            if(input_val == ''){
                empty = true;
            }
    	});
        if(empty == true){
            alert('Xin vui lòng điền đầy đủ thông tin!');
            return false;
        }else{
            return true;
        }
   }); 
});
</script>